﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Web.App_Start
{
    using AppFunc = Func<IDictionary<string, object>, Task>;

    public class NewRelicIgnoreTransactionOwinModule
    {
        private readonly AppFunc _nextAppFunc;

        public NewRelicIgnoreTransactionOwinModule(AppFunc nextAppFunc)
        {
            _nextAppFunc = nextAppFunc;
        }

        public Task Invoke(IDictionary<string, object> environment)
        {
            return _nextAppFunc(environment);
        }
    }
}